//
//  CPEditInfoVC.m
//  CPApp
//
//  Created by yobet on 2018/3/23.
//  Copyright © 2018年 Class. All rights reserved.
//

#import "CPEditInfoVC.h"

@interface CPEditInfoVC ()
@property (weak, nonatomic) IBOutlet UILabel *account;
@property (weak, nonatomic) IBOutlet UITextField *username_TF;
@property (weak, nonatomic) IBOutlet UITextField *introduce_TF;
@property (weak, nonatomic) IBOutlet UITextField *tellNum;

@end

@implementation CPEditInfoVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title= @"修改资料";
     self.tableView.tableFooterView = [UIView new];
    self.account.text = [mUserDefaults objectForKey:@"username"];

}


- (IBAction)submitBtn:(UIButton *)sender {
    [ProgressHUD showLoading];
    [mUserDefaults setObject:self.username_TF.text forKey:@"username"];
    [mUserDefaults setObject:self.introduce_TF.text forKey:@"content"];
    [mUserDefaults setObject:self.tellNum.text forKey:@"tell"];
    [mUserDefaults synchronize];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.75 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [ProgressHUD dismiss];
        [self.navigationController popViewControllerAnimated:YES];
    });
    
}

@end
